home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / winlib3.zip / BSTRING.H < prev    next >
Text File  |  1991-01-14  |  715b  |  28 lines

  1. #ifndef BIT_STRING_DEF
  2. #define BIT_STRING_DEF
  3. #undef  PROTO_DEF
  4. #include <proto.h>
  5.  
  6. typedef struct
  7. {
  8.   unsigned char *bit_string;
  9.   unsigned nbits;
  10. } BITSTRING;
  11.  
  12. #define clear_bits(b,s,e)      set_clear_bits((b),(s),(e),0)
  13. #define set_bits(b,s,e)        set_clear_bits((b),(s),(e),1)
  14.  
  15. #if __cplusplus
  16.   extern "C" {
  17. #endif
  18. int          create_bit_string P((BITSTRING *, unsigned));
  19. void         free_bit_string P((BITSTRING *));
  20. void         set_clear_bits P((BITSTRING *, unsigned, unsigned, int));
  21. unsigned     get_bits_set P((BITSTRING *));
  22. int          test_bit P((BITSTRING *, unsigned));
  23. unsigned     get_first_bit_set P((BITSTRING *, unsigned));
  24. #if __cplusplus
  25.   }
  26. #endif
  27. #endif
  28.